<?php

App::uses ( 'AppController', 'Controller' );
/**
 * Online sale
 *
 * @property Order $Order
 * @property OrderItem $OrderItem
 */
class OnlineController extends AppController {
	var $helpers = array (
			'Number',
			'Time',
			'Text',
	);
	public $uses = array (
			'Order',
			'OrderItem',
			'Cart',
	);
	public function index() {
		$this->set('orders', $this->paginate("Order"));
	}
	
	public function indexdata() {	

		$Order = $this->loadModel('Order');
				
        $this->autoRender = false;  
		$output = $this->Order->GetData();	
		echo json_encode($output);
		
	}

}